// @ts-ignore
/* eslint-disable */
import request from '@/request'

/** 此处后端没有提供注释 POST /classes/add */
export async function addClasses(body: API.ClassesAddRequest, options?: { [key: string]: any }) {
  return request<API.BaseResponseLong>('/classes/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /classes/delete */
export async function deleteClass(body: API.DeleteRequest, options?: { [key: string]: any }) {
  return request<API.BaseResponseBoolean>('/classes/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /classes/get/teacher/class */
export async function getClassesByTeacherId(options?: { [key: string]: any }) {
  return request<API.BaseResponseListTeacherClassesVO>('/classes/get/teacher/class', {
    method: 'GET',
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /classes/list/page/vo */
export async function listClassesVoByPage(
  body: API.ClassesQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageClassesVO>('/classes/list/page/vo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /classes/student/class/exercise_sets */
export async function listStudentClassExerciseSets(
  body: API.PageRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageStudentExercisesSetsVO>(
    '/classes/student/class/exercise_sets',
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      data: body,
      ...(options || {}),
    }
  )
}

/** 此处后端没有提供注释 GET /classes/teacher/class/exercise */
export async function getTeacherClassExercises(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getTeacherClassExercisesParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseListExercisesVO>('/classes/teacher/class/exercise', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /classes/teacher/class/exercise_sets */
export async function listTeacherClassExerciseSets(options?: { [key: string]: any }) {
  return request<API.BaseResponseListExercisesSets>('/classes/teacher/class/exercise_sets', {
    method: 'GET',
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /classes/update */
export async function updateClass(
  body: API.ClassesUpdateRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>('/classes/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}
